Tipedia

TiDB start handling SQL

Last edited by longfangsong at 2021-03-22
TiDB exec sql

In server/conn.go, TiDB realized for the first time that it was dealing with the SQL passed in by the user.

This function will parse the incoming SQL and use it to call handleStmt in the same file, and TiDBContext.ExecuteStmt will forward most of the SQL statements to TiDBContext.ExecuteStmt, and then to session.ExecuteStmt for processing. Most of the statements will be compiled into Plan in session.ExecuteStmt and executed by runStmt

Links